1. Field of the Invention
The present invention relates to information transmission apparatuses that transmit data and information transmission methods for transmitting data, where generation amount per unit time of the data changes, and more particularly, to an information transmission apparatus and an information transmission method that are capable of efficiently transmitting data.
2. Description of the Related Art
Data encoding efficiency greatly changes in accordance with a characteristic of data encoded and a characteristic of an encoding method used. It is not desirable to transmit to an apparatus an amount of encoded data that exceeds the capability of the apparatus. Thus, for example, a method for achieving reliable data transmission by controlling the quality of encoding processing to reduce the change of encoded data amount has been proposed.
For example, Japanese Patent No. 2675130 discloses an image data transfer apparatus. When each frame of an image is encoded, an excess data portion, which is a portion of a piece of encoded data, the portion being of a data amount by which the piece of encoded data exceeds a threshold, is multiplexed with encoded data of a temporally preceding frame whose code amount does not reach the threshold, and the obtained multiplexed encoded data is transmitted. The remaining encoded data, whose code amount does not exceed the threshold, is normally transmitted. Thus, a deterioration of image quality of a frame that has a large amount of encoded data can be suppressed, and the amount of data to be transmitted falls under the threshold.
FIG. 4 is a block diagram showing an example of a configuration of an image data transfer apparatus of the related art.
Analog original image data (moving image) received at an input terminal 4101 is converted into digital moving image data by an analog-to-digital (A/D) converter 4102, and the digital moving image data is stored in a frame memory 4103. The digital moving image data stored in the frame memory 4103 is read according to need and input to an encoder 4104.
The encoder 4104 encodes the received digital moving image data using a predetermined method. The encoder 4104 also generates a frame number for each encoded frame, and outputs the generated frame numbers to a switch (SW) 4108 and a main frame number generator 4112.
The encoded data is stored, for each frame, in one of memories 4109 to 4111 (memory numbers 1 to N) through the switch 4108. When the frame number of a frame encoded by the encoder 4104 is “X” and the remainder of X/N is “n”, the switch 4108 is controlled such that the encoded data corresponding to the frame number X is stored in the memory whose memory number is n+1.
That is, if the frame number of the latest encoded frame to be currently stored in a memory is 33 (that is, X=33) and the total number of memories is 5 (that is, N=5), the value “4” is obtained from the equation n+1=4. Thus, the switch 4108 is controlled such that encoded data corresponding to the frame number 33 is stored in the memory 4.
When a memory that stores certain encoded data is selected in accordance with the above-mentioned rule, at a point in time when the encoded data whose frame number is 33 is stored in the memory 4, encoded data whose frame number is 32 is stored in the memory 3, encoded data whose frame number is 31 is stored in the memory 2, encoded data whose frame number is 30 is stored in the memory 1, and encoded data whose frame number is 29 is stored in the memory 5.
As described above, in accordance with the frame number X generated by the encoder 4104 for each encoded frame and the total number N of memories, the value obtained from n+1 is obtained. In accordance with the value obtained from n+1, the switch 4108 is controlled. Thus, encoded frames are sequentially stored in the memories 1 to N.
The frame number of the encoded frame that is read from one of the memories 1 to N and that is output to a multiplexer 4116 is represented by a main frame number Xnext output from the main frame number generator 4112.
An encoded frame corresponding to the main frame number Xnext corresponds to an encoded frame stored in the m+1th memory.
Here, “m” represents the remainder obtained by dividing the main frame number Xnext by N (the number of memories). In addition, the main frame number Xnext is represented by a difference between the current frame number X and a value obtained from N−1. Thus, when the frame number X is 33 and the number N of memories is 5, the main frame number Xnext is 29.
That is, a main frame is equal to the first stored (or oldest) encoded frame in one of the memories 1 to N.
A scene change frame number generation circuit 4115 compares the code amount of the current encoded frame that is encoded by the encoder 4104 and that is stored in one of the memories 1 to N (in this case, N=5) with a threshold, and detects a frame having a code amount that exceeds the threshold.
When detecting a frame having a code amount that exceeds the threshold, the scene change frame number generation circuit 4115 determines that the detected frame is a scene change frame. The frame number Xc of the detected frame is held in the scene change frame number generation circuit 4115 for a period of time corresponding to N frames (in this case, N=5). The scene change frame number Xc is also output to a selector switch 4114 and the multiplexer 4116.
The selector switch 4114 interprets the contents of a memory whose memory number is k+1 determined from the scene change frame number Xc as an encoded frame corresponding to a scene change frame. Then, the selector switch 4114 reads a desired portion of the contents of the memory whose memory number is k+1 from among the memories 1 to N.
Here, “k” represents the remainder obtained by dividing the scene change frame number Xc by the total number N of memories.
If the scene change frame number Xc is 33, as shown in part (a) of FIG. 5, an encoded frame corresponding to the frame number 33 is determined to be encoded data of a scene change frame. Thus, a portion of the contents of the memory 4 (that is, k+1=4), in which the encoded data is stored, is read in parallel to data of the encoded frame corresponding to the main frame number Xnext (that is, the contents of the memory 5).
The read contents of the memory 4 and the read contents of the memory 5 are multiplexed with each other by the multiplexer 4116, and are stored in a buffer memory 4105. The stored contents are sequentially read and input to a recorder 4106.
The multiplexed data input to the recorder 4106 is recorded on a recording medium 4107 under the control of the recorder 4106.
Segmentation of encoded data of a frame determined to be a scene change frame (scene change frame number Xc=33) and multiplexing of the segmented encoded data with a main frame (main frame number Xnext=29) is performed (N−1) times after the scene change frame number generation circuit 4115 detects the scene change.
Thus, as shown in part (b) of FIG. 5, a portion of the encoded data corresponding to the frame number 33 (a portion of the contents of the memory 4) is also multiplexed with encoded data of other frames subsequent to the encoded data corresponding to the frame number 29 (the contents of the memory 5). More specifically, encoded data corresponding to the frame number 30 (the contents of the memory 1), encoded data corresponding to the frame number 31 (the contents of the memory 2), and encoded data corresponding to the frame number 32 (the contents of the memory 3) are also read at the same time, and are input to the multiplexer 4116.
The way in which a portion of encoded data of a scene change frame that is to be multiplexed with encoded data of another frame is determined is not particularly limited.
When the encoded data corresponding to the frame number 33, which is a scene change frame, is output as a main frame (corresponding to a main frame number Xnext), the remaining encoded data, which is data other than the portion multiplexed with the preceding frames and transmitted, is transmitted as encoded data of the main frame.
Such an image data transfer apparatus of the related art is provided to control the transmission data amount when recording onto a recording medium whose write data rate is fixed and stable is performed. Thus, an environment in which the quality of a transmission channel used for transmission of encoded data read from the buffer memory 4105 to the recorder 4106 dynamically changes is not assumed.
Thus, a threshold for detecting a scene change frame is fixed. This does not cause a big problem when the quality of the transmission channel is excellent. However, when the quality is deteriorated, overflow of the buffer memory 4105 may occur even if the encoded data amount does not reach the threshold.
An excess code amount is equally allocated to a plurality of preceding frames (see part (b) of FIG. 5). Thus, even if the encoded data amount of the preceding frame is small and multiplication of a larger amount of encoded data is possible, only multiplication of a fixed amount of encoded data is performed. Thus, the use efficiency of a transmission band cannot be maintained at a high level. In addition, if the encoded data amount of a frame to be multiplexed is close to the threshold, multiplexing may not be able to be performed.
As described above, it is difficult to apply a transmission control method of the related art to data transmission control of a communication apparatus that performs data transmission using a transmission channel whose transmission quality dynamically changes, such as a wireless communication line.